<html>
<head><meta charset="utf-8"><title>PR review for issue 6640 · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/PR.20review.20for.20issue.206640.html">PR review for issue 6640</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226457269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/PR%20review%20for%20issue%206640/near/226457269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pag4k <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/PR.20review.20for.20issue.206640.html#226457269">(Feb 16 2021 at 00:00)</a>:</h4>
<p>Hello!<br>
I have a PR in review (<a href="https://github.com/rust-lang/rust-clippy/pull/6665">https://github.com/rust-lang/rust-clippy/pull/6665</a>) and I am getting great comments. However, we have a discussion that would be simpler to deal with here than on the PR.<br>
We are having a long discussion that ended up with come on Zulip: <a href="https://github.com/rust-lang/rust-clippy/pull/6665#discussion_r572311787">https://github.com/rust-lang/rust-clippy/pull/6665#discussion_r572311787</a><br>
Anyone what to have a look? Or even better, xFrednet or camSteffen? :-)</p>



<a name="226457908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/PR%20review%20for%20issue%206640/near/226457908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pag4k <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/PR.20review.20for.20issue.206640.html#226457908">(Feb 16 2021 at 00:11)</a>:</h4>
<p>The objective is to extend unnecessary_wraps to deal with the cases where the return type is <code>Option&lt;()&gt;</code> and <code>Result&lt;()&gt;</code>.<br>
The main issue I have is that it is more complicated to offer suggestions for the function body since it is different if it returns <code>Some(())</code> or <code>return Some(());</code>. Is it worth it to make it as pretty as possible?</p>



<a name="226461576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/PR%20review%20for%20issue%206640/near/226461576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/PR.20review.20for.20issue.206640.html#226461576">(Feb 16 2021 at 01:23)</a>:</h4>
<p>My personal opinion is that it's good enough to just point at the returned thing and say "remove this" and let the coder figure it out from there.</p>



<a name="226461619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/PR%20review%20for%20issue%206640/near/226461619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/PR.20review.20for.20issue.206640.html#226461619">(Feb 16 2021 at 01:24)</a>:</h4>
<p>And IIUC this would stay close to the existing implementation</p>



<a name="226484723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/PR%20review%20for%20issue%206640/near/226484723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/PR.20review.20for.20issue.206640.html#226484723">(Feb 16 2021 at 08:26)</a>:</h4>
<p>left a <a href="https://github.com/rust-lang/rust-clippy/pull/6665#discussion_r576630132">comment</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>